package cn.gjculture.shopping.api.entity;

import lombok.Data;

import java.sql.Timestamp;

@Data
public class Return<T> {
    private Common common=new Common();
    private T data;
    private PageInfo pageInfo;

    @Data
    public static class Common{
        private Timestamp timestamp= new Timestamp(System.currentTimeMillis());
        private boolean ret =false;
        private String message;
        private String error;
    }

    public static Return setRet(boolean ret){
        Return aReturn=new Return();
        aReturn.getCommon().setRet(ret);
        return aReturn;
    }
}

